//
// Created by Zhang on 2021/3/31.
//

#include "q23.h"

#include "q21.h"
#include "stdio.h"

int sum_counter_diagonal(int **matrix, int n) {
    int sum = 0;
    for (int i = 0; i < n; i++) {
        sum += *(*(matrix + n - 1 - i) + i);
    }
    return sum;
}

int unit_test_23(int n) {
    int **p = create_matrix(n);
    printf("%d\n", sum_counter_diagonal(p, n));
    free_matrix(p,n);
}
